<?php

namespace App\Utils;

final class CommonUtil
{
    public static function camelCaseToUnderscore($camelCase) {
        return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $camelCase));
    }

    public static function underscoreToCamelCase($underscore) {
        return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $underscore))));
    }
}
